home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / September 96 / Re Bounds of s PolygonShape, b < prev    next >
Encoding:
Internet Message Format  |  1996-09-19  |  1.2 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Bounds of s PolygonShape, bug
  2. Sent:        9/12/96 3:50 PM
  3. Received:    9/12/96 3:50 PM
  4. From:        Brad Pettit <bpettit@apple.com>
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List
  7.  
  8.  
  9. The bounds is too small compared to what, the bounds of the points, or 
  10. the bounds of what gets rendered if you frame it? The ODShape does not 
  11. take into account any pen width (which would hang down, and to the right).
  12.  
  13. --Brad
  14.  
  15. >I have noticed that if I create an ODShape based on the region of an
  16. >arbitrary polygon, then later ask for the shape's bounds, the bounds will
  17. >be too small on the right side and the bottom side, each by one pixel.
  18. >
  19. >ODShape* polyShape = ::FW_NewODShape( ev );
  20. >::FW_SetShapeRegion( ev, polyShape, ::FW_CreatePolygonRegion(
  21. >fPoly.GetCount(), fPoly.GetPoints() ) );
  22. >
  23. >selectionBounds = FW_GetShapeBoundingBox(ev, polyShape);
  24. >
  25. >selectionBounds will be too small.
  26. >
  27. >The code above begins in FW_CDragCommand::BeginDrag() where the selection
  28. >is asked to create the drag shape. Immediately afterward the bnds is
  29. >requested and used. A complex polygon will appear closed when dragged and
  30. >will leave a trail because the bounds is too small.